package com.bootdo.acitvity.listener.message.test;

import com.bootdo.acitvity.listener.message.OrderAggregateRoot;
import com.bootdo.acitvity.listener.message.dto.PurchaseOrderDto;
import com.bootdo.acitvity.listener.message.entity.PurchaseOrder;

public class MockOrderRepository implements BackendOrderRepository{

    public OrderAggregateRoot getById(String orderId){

        OrderAggregateRoot root = new OrderAggregateRoot();

        PurchaseOrder purchaseOrder = new PurchaseOrder("PO213123");

        PurchaseOrderDto purchaseOrderDto = new PurchaseOrderDto();
        purchaseOrderDto.setFsupplierOrderId("CG213313");
        purchaseOrderDto.setFsupplierId(1L);
        purchaseOrderDto.setFstatus(2);

        purchaseOrder.setPurchaseOrderDto(purchaseOrderDto);
        return root.addBackendOrder(purchaseOrder);
    }


    public OrderAggregateRoot save(OrderAggregateRoot order){
        return null;
    }

}
